<template>
    <div>
        <ul class="menu_top_list ">
            <li @click="add()">
                <span class="iconfont icon-fanhui"></span>

            </li>
            <li>游戏合辑</li>
            <router-link tag="li" to="/home" class="index-btn"></router-link>

        </ul>
        <div class="md-collect">
            <ul id="list_box">
                <li v-for="(item, index) in allColl " :key="'ifo-' + index">
                    <router-link tag="a" :to="'./gameCo?id=' + item.id">
                        <img :src="item.img" alt="">
                        <p>{{item.title}}</p><span>{{item.qq}}</span>
                    </router-link>

                </li>

            </ul>
            <div class="loadmore" id="loading">
                <p><span>没有更多合辑了</span></p>
            </div>
        </div>
    </div>
</template>
<script>
import { allColl } from '@/api/home';

export default {
    data() {
        return {
            allColl:[]


        }
    },
    methods: {
        // 返回go(-1)
        add() {
            this.$router.go(-1)
        }
    },
    mounted(){
        allColl().then(data => {
          this.allColl=data
        })
    }
}
</script>

<style lang="scss" scoped>
.loadmore p span {
    position: absolute;
    top: 0;
    left: 50%;
    margin-left: -60px;
    display: block;
    width: 120px;
    background: #fff;
}

.loadmore p::before {
    display: block;
    position: absolute;
    top: 16px;
    left: 50%;
    width: 250px;
    margin-left: -125px;
    height: 1px;
    background-image: linear-gradient(to right, #f1f1f1 0%, #d7d7d7 50%, #f1f1f1 100%);
    content: "";
}

.loadmore p {
    text-align: center;
    color: #959595;
    font-size: 14px;
    position: relative;
    height: 32px;
}

.loadmore {
    height: 32px;
    line-height: 32px;
    background: #fff;
    text-align: center;
}

.loadmore {
    height: 32px;
    line-height: 32px;
    text-align: center;
    margin: 20px 0;
    color: #b4b3b3;
}

.md-collect li a::after {
    content: '';
    width: 100%;
    height: 105px;
    position: absolute;
    left: 0;
    bottom: 0;
    background: url("https://h.4399.com/images/2022/dark_mask.png") repeat-x;
    background-size: 50px 200px;
}

.md-collect li span {
    position: absolute;
    right: 10px;
    bottom: 10px;
    color: #f1f1f1;
    background: url("https://h.4399.com/images/2022/eyes_icon_2.png") no-repeat left center;
    background-size: 17px 11px;
    padding-left: 19px;
    z-index: 2;
    opacity: 0.8;
}

.md-collect li p {
    width: 70%;
}

.md-collect li p {
    padding: 9px 12px;
    color: #fff;
    font-size: 15px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    z-index: 2;
    position: absolute;
    left: 0;
    bottom: 0;
    box-sizing: border-box;
    width: 100%;
}

.md-collect li img {
    width: 100%;
    height: 170px;
    display: block;
}

.md-collect li a {
    display: block;
    width: 100%;
    height: 170px;
}

.md-collect li {
    margin: 0 auto 11px;
    width: 100%;
    height: 170px;
    overflow: hidden;
    position: relative;
    border-radius: 12px;
}

.md-collect {
    margin: 48px 10px;
}

.md-con-fixed {
    height: 48px;
}

.con-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 48px;
    line-height: 48px;
    background: #fff;
    color: #333333;
    z-index: 99;
}

.con-header em {
    display: block;
    height: 48px;
    text-align: center;
    font-size: 16px;
    font-weight: bold;
}

em,
i {
    font-style: normal;
    vertical-align: top;
}

.index-btn {
    background: url("https://h.4399.com/images/2022/backindex_icon.png") no-repeat -9px 0;
    background-size: 28px;
    width: 40px;
    height: 38px;
    right: 0;
    background-position: 5px 14px;
    cursor: pointer;
}

.menu_top_list {
    max-width: 500px;
    margin: 0 auto;
    position: fixed;
    height: 48px;
    width: 100%;
    background-color: white;
    color: #333;
    font-size: 16px;
    font-weight: bold;

    z-index: 90;
    top: 0;
}

.menu_top_list li+li {
    width: 64%;
    -webkit-box-pack: center;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.menu_top_list li {
    float: left;
    display: -webkit-box;
    -webkit-box-align: center;
    height: 48px;
}

.menu_top_list li:first-child {
    cursor: pointer;
    width: 18%;
    color: #BFBFBF;
    font-size: 20px
}

.menu_top_list li:last-child {
    width: 18%;
}

.menu_top_list li:first-child::before {
    background: url("https://rs.sfacg.com/web/m/images/menu_top_icon.png") no-repeat -49.216px 9.96px;
    background-size: 105.462px;
    content: "";
    height: 46.8px;
    width: 24.608px;
    display: block;
}
</style>